package org.qing.cloud.common.security.exception;

import org.qing.cloud.common.security.component.SysAuth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@JsonSerialize(using = SysAuth2ExceptionSerializer.class)
public class ForbiddenException extends SysAuth2Exception {
	
	private static final long serialVersionUID = 1955005449471174514L;

	public ForbiddenException(String msg, Throwable t) {
		super(msg);
	}

	@Override
	public String getOAuth2ErrorCode() {
		return "access_denied";
	}

	@Override
	public int getHttpErrorCode() {
		return HttpStatus.FORBIDDEN.value();
	}

}
